home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
101-125
/
scopedisk101
/
lvideo
/
lvideo.doc
< prev
next >
Wrap
Text File
|
1995-03-19
|
7KB
|
163 lines
Contained in this package is a Pioneer laser video disk driver for
The Director. Also the system date & time can be read more easily using
this module. If you or anyone you know is interested in using The
Director to control laser video disk players, you may wish to download
this package. Right now, only the Pioneer players are supported, though
the interface is very general, it might be able to be adapted to other
players with some experimentation. This is kind of a "beta" version,
we would appreciate any input you might have with regards to the use
of this module so that we may improve its capabilities for an eventual
commercial release. It has been tested with the LD-V4200 player, and
should work with the 2000 series as well, Pioneer uses pretty much the
same type of protocol throughout their product line.
The laser video driver is implemented as a modified sound module,
it will communicate through the serial port to the laser disk
player. The standard sound commands are supported as well.
Note: it is absolutely guaranteed that the methods employed here
with regards to video disk control will vary by the time a commercial
release is prepared (planned to work with a future major enhanced version
of The Director). The safest thing to do is to implement your disk
controls as GOSUBs, so that if later it is necessary to modify
the script you will only have to do it in one place for each command,
not spread all throughout your script.
Setup:
Copy the "lvideo.mod" file into your "options" directory, or wherever
MOD: is assigned for The Director on your system.
Use Preferences to select the baud rate and other serial parameters
for connection to the video disk player.
It will be useful to obtain a copy of the players user manual which
contains all of the commands available. The commands are generally
implemented in one of two ways, a 2 letter command followed by a
CR character, or a numeric parameter followed by a two letter command
and a CR character.
Commands are responded to in two ways, either with a letter followed
by a numeric code, or with just a numeric code.
To use, you first use the MODULE command to select the laser video
module in your script:
module "lvideo"
Note that "lvideo" should be lower case.
Then, if you plan to use the laser video portion of the module (it
also contains all of the usual sound module capabilities) you need
to initialize the communications:
sound v,"init"
Note that the SOUND command is still used to communicate with the
driver module. This is because the standard sound commands are
implemented in the module as well. The laser video commands
are simply an extention of the standard sound commands.
To send the video player a command, use the "lv" command:
sound v,"lv","PL"
This is the PLAY command. The players manual will list the other
2 letter commands that can be substituted for other control functions.
If the command requires a parameter, such as with the search command,
it will look something like this:
sound v,"lv","10552SE"
or
sound v,"lv",fr,"SE"
In the first instance, the frame location is built right into the search
command, in the second, the frame location is contained in the variable
"fr". Either method is acceptable.
To get the response from a command, use the response command:
sound val,"response"
It will return in the variable "val" the response code. Virtually ALL
commands return some sort of response, so it is important to get the
response codes so that they don't interfere with the next command.
If there is no response code, "response" will wait for one. You can
test for a response without waiting with the "test" command which
is otherwise equivalent to the "response" command. "test" will return
a -2 if there is no response yet (-1 is reserved for a module error
condition). The normal response, "R" from the player, will appear as
a -1000000. If the response code is prefixed with a letter, it will
return as a negative number, if there is no letter prefix, it will
return as a positive number (as in the ?F get frame number command).
The actual letter returned is converted into a "range" of numbers
depending on the letter prefix. For example, all "R" codes will be
in the -1000000 to -1999999 range. All "E" error codes will be in
the -3000000 to -3999999 range. All "P" codes will be in the -2000000
to -2999999 range. A normal "R" response which most commands will
return from the player, will return a -1000000 from the driver module.
A test script called "lvideo" is included that you can use to try out some
of the standard commands. It will also allow you to click on a "command"
text box and type in other commands which you wish to try. The "RESULT"
box should be clicked on after you try commands in this manner, so that
the old result code isn't left pending for the next command you try.
The "RESULT" button does a "test" so if the result isn't yet available,
or there is no result, you will get a -2.
Note that some commands won't return a result immediately, but after
some operation in the video player is completed. If you test for a result
before the operation is complete, you will get a -2 (no result). Once
the operation is complete you will get the proper result. This will allow
you to test for the completion of an operation while doing other things,
such as animating, etc.
The buttons in the example labeled "chapter", "frame" and "time" cause
the display of the chapter, frame, and time above the buttons to be
updated with the current values from the player. Note that the "time"
parameter only works with CLV disks on the LD-V4200 (and perhaps the
others as well). These values are not updated automatically in the
example, but only when you press the buttons.
In addition to the laser video enhancements in this driver, also is
contained the ability to read the system date & time. To do so, there
are 2 commands:
sound day,"day"
sound time,"time"
"day" is returned in the number of days since January 1,1978. Time
is returned in the number of "tics" in the current day (50ths of a
second). These values can be converted with a little bit of computation
to MM/DD/YY HH:MM:SS. As an example, the time would convert like this:
hour = time/180000
minute = (time/3000)%60
second = (time/50)%60
etc. Converting day to MM/DD/YY is a bit more complicated as you
have to take leap years into account. I haven't had time to figure
out the exact computation so I will leave it as an exersize for the
reader for now. This feature will be built in to the major Director
release currently in process, and the computations will be worked out
in full then.
Again, note that this is an experimental "beta" video disk driver,
we need your comments and suggestions in order to make improvements.
Thanks,
Keith Doyle
Right Answers
Box 3699
Torrance, CA 90510
(213)-325-1311